<?php
/*
 * ebiz front
 *
 * Success Order View
 *
 * @author allen
 *
 */

?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
    <head>
        <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
        <title>结算中心 - 阿基米米网上商城</title>
        <script type='text/javascript' language='javascript' src='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/n/javascript/lib/jquery.js'></script>
        <!--
        <script type='text/javascript' language='javascript' src='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/n/javascript/frontend.js'></script>
        -->
        <link href='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/t/<?php echo $config ['template_name']; ?>/css/style.css' rel='stylesheet' type='text/css' />
        <script type='text/javascript' language='javascript' src='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/t/<?php echo $config['template_name']; ?>/javascript/akimimi.js'></script>
        <link href='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/t/<?php echo $config ['template_name']; ?>/css/headerAndFooter.css' rel='stylesheet' type='text/css' />
    </head>
    <body>

        <?php echo HeaderView::getCommonHeaderView();?>

        <div class="layoutmain" style="width:960px;  background-color: #fcfcfc;">
            <div style="margin:auto;">
                <img src="<?php echo ConfigConstants::getTImagePath(); ?>/dingdan_04.jpg" alt="" style="width:960px;" />
            </div>
            <div class="my_cart1"><img height="41" width="971" src="<?php echo ConfigConstants::getTImagePath(); ?>/successorde_4.gif"/></div>
            <div style="background-image: url(<?php echo ConfigConstants::getTImagePath(); ?>/line.gif); background-repeat: repeat-y;" class="my_cart2">
                <div class="checkout_item">
                    <div style="font-size: 14px; font-weight: bold; padding-top: 10px; padding-bottom: 10px; padding-left: 5px; color: rgb(51, 51, 51); margin-left: 10px;">商品列表</div>
                    <div style="border: 1px solid rgb(179, 217, 230); padding: 3px; background-color: rgb(244, 249, 252); width: 945px; margin-left: 10px;">
                        <div style="padding: 1px; background-color: rgb(217, 235, 246); width: 940px; height: 25px; text-align: center; line-height: 25px;">
                            <div class="text-center" style="width: 300px; float: left;">商品信息</div>
                            <div class="text-center" style="width: 100px; float: left;">供货商品</div>
                            <div class="text-center" style="width: 100px; float: left;">单价</div>
                            <div class="text-center" style="width: 100px; float: left;">数量</div>
                            <div class="text-center" style="width: 100px; float: left;">金额</div>
                            <div class="text-center" style="width: 100px; float: left;">发票</div>
                            <div class="text-center" style="width: 100px; float: left;">税费</div>
                            <div class="clear"></div>
                        </div>
                    <?php
                        $orderInfo = $orderInfo[0];
                        foreach ($orderItemInfo as $item) :
                            $str_temp0 = '';
                            if($item["cheque_rule"] == "3"){
                            	$str_temp0 = "不需要";
                            }elseif($item["cheque_rule"] == "2" || $item["cheque_rule"] == "21" || $item["cheque_rule"] == "22" || $item["cheque_rule"] == "23" || $item["cheque_rule"] == "24" || $item["cheque_rule"] == "25"){
                                $str_temp0 = "需要";
                            }else{
                            	if($item["cheque_status"] == "0"){
                            		$str_temp0 = "不需要";
                            	}else{
                            		$str_temp0 = "需要";
                            	}
                            }
                    ?>
                        <div style="margin-top: 10px; margin-bottom: 10px;">
                            <div class="text-center" style="width: 300px; float: left;"><label title="<?php echo $item["title"]; ?>"><?php echo $item["title"]; ?></label></div>
                            <div class="text-center" style="width: 100px; float: left;">Akimimi</div>
                            <div class="text-center" style="width: 100px; float: left;"><?php echo UNIT.$item["sale_price"]; ?></div>
                            <div class="text-center" style="width: 100px; float: left;"><?php echo $item["quantity"]; ?></div>
                            <div class="text-center" style="width: 100px; float: left;"><?php echo UNIT.(number_format($item["deal_price"]*$item["quantity"],2,null,'')); ?></div>
                            <div class="text-center" style="width: 100px; float: left;"><?php echo $str_temp0?></div>
                            <div class="text-center" style="width: 100px; float: left;"><?php echo UNIT.$item["tax"]; ?></div>
                            <div class="clear"></div>
                            <div style="margin-left:50px;">
                                <?php
                                $orderService = new OrderService();
                                $itemId = $item["pItemId"];
                                $itemAttribute = $orderService->getItemAttribute($itemId);
                                if( !empty($itemAttribute) ){
                                    foreach ($itemAttribute as $itemAttr) { ?>
                                    <span style="margin-left:10px;"><?php echo $itemAttr["attr"]; ?></span>
                                    <span style="margin-right:10px;"> [ <?php echo $itemAttr["attr_title"]; ?> ] </span>
                                <?php  }
                                 } ?>
                            </div>
                        </div>
                    <?php endforeach; ?>
                    </div>
                </div>
                <div class="clear"></div>

                <div class="checkout_item">
                    <div style="font-size: 14px; font-weight: bold; padding-top: 10px; padding-bottom: 10px; padding-left: 5px; color: rgb(51, 51, 51); margin-left: 10px;">支付信息</div>
                    <div class="clear"></div>
                    <div style="border: 1px solid rgb(179, 217, 230); padding: 3px; background-color: rgb(244, 249, 252); width: 945px; margin-left: 10px;">
                        <div style="line-height: 30px; padding-left: 30px; width: 240px; float: left; height: 30px;">商品金额：<?php echo UNIT.$orderInfo["merchandise_total"]; ?></div>
                        <div class="text-center" style="width: 240px; float: left;">商品运费：<?php echo UNIT.$orderInfo["shipping_fee"]; ?></div>
                        <div class="text-center" style="width: 240px; float: left;color:red;">商品折扣：<?php echo UNIT.$orderInfo["discount_fee"]; ?></div>
                        
                        <div class="clear"></div>
                        <div>
                            <div style="line-height: 30px; padding-left: 50px; width: 500px; height: 30px; color: red;">总计：<?php echo UNIT.$orderInfo["total"]; ?></div>
                            <div class="clear"></div>
                        </div>
                   </div>
                </div>


                <div class="checkout_item">
                    <div style="font-size: 14px; font-weight: bold; padding-top: 10px; padding-bottom: 10px; padding-left: 5px; color: rgb(51, 51, 51); margin-left: 10px;">配送信息</div>
                    <div style="border: 1px solid rgb(179, 217, 230); padding: 3px; background-color: rgb(244, 249, 252); width: 945px; margin-left: 10px;">
                        <div style="line-height: 30px; padding-left: 30px; width: 300px; float: left; height: 30px;">收货人：<?php echo $orderInfo["delivery_name"]; ?></div>
                        <div class="text-center" style="width: 300px; float: left;">电子邮件：<?php echo $orderInfo["delivery_email"]; ?></div>
                        <div class="clear"></div>
                        <div>
                            <div style="line-height: 30px; padding-left: 30px; width: 300px; float: left; height: 30px;">您的手机：<?php echo $orderInfo["delivery_phone2"]; ?></div>
                            <div class="text-center" style="width: 300px; float: left;">固定电话：<?php echo $orderInfo["delivery_phone1"]; ?> </div>
                            <div class="clear"></div>
                        </div>
                        <div>
                            <div style="line-height: 30px; padding-left: 30px; width: 300px; height: 30px;">送货地址：<?php echo $orderInfo["address1"]."  ".$orderInfo["address2"]."  ".$orderInfo["address3"]; ?> </div>
                        </div>
                        <div>
                            <div style="line-height: 30px; padding-left: 30px; width: 300px; height: 30px;">详细地址：<?php echo $orderInfo["delivery_detail_address"]; ?> </div>
                        </div>
                    </div>
                </div>
                <div style="width:900px;">
                    <div style="margin:10px;width:800px;">
                <?php if($orderStatus == 1){ ?>
	                    <div style="cursor:pointer;float:left;margin-left:300px;" onclick="window.location='/o/onlineorderpay?orderId=<?php echo base64_encode($orderInfo['id'])?>';">
	                        <img src="<?php echo ConfigConstants::getTImagePath(); ?>/successorde_11.png" />
	                    </div>
                        <div style="float:left;margin-left:10px;">
                            <input type="image"  onclick="window.location='/userinfo/myorderlist';" alt="查看全部订单" src="<?php echo ConfigConstants::getTImagePath(); ?>/order_list_botton2.gif" />
                        </div>
                <?php }else{ ?>
                        <div style="margin-left:400px;">
                            <input type="image"  onclick="window.location='/userinfo/myorderlist';" alt="查看全部订单" src="<?php echo ConfigConstants::getTImagePath(); ?>/order_list_botton2.gif" />
                        </div>
                <?php }?>
                        <div class="clear"></div>
                    </div>
            </div>
        </div>

        <?php echo FooterView::getCommonFooterView(); ?>

        </body>
</html>
